package com.sl.ms.carriage.service;

import com.sl.ms.carriage.domain.dto.CarriageDTO;
import com.sl.ms.carriage.domain.dto.WaybillDTO;
import com.sl.ms.carriage.entity.CarriageEntity;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 冉申强
 * @version 1.0
 * @description: TODO
 * @date 2025/6/20 22:04
 */
@SpringBootTest
public class CarriageServiceText {
    @Resource
    private CarriageService carriageService;
    @Test
    public void findAll(){
        List<CarriageDTO> list = this.carriageService.findAll();
        list.forEach(System.out::println);
    }
    @Test
    void compute() {
        WaybillDTO waybillDTO = new WaybillDTO();
        waybillDTO.setReceiverCityId(7363L); //天津
        waybillDTO.setSenderCityId(2L); //北京
        waybillDTO.setWeight(3.8); //重量
        waybillDTO.setVolume(125000); //体积
        CarriageDTO compute = this.carriageService.compute(waybillDTO);
        System.out.println(compute);
    }
}
